import Vue from 'vue'
import VueRouter from 'vue-router'
import Recommend from '../views/Recommend.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Recommend',
    component: Recommend
  },
  {
    path: '/hot',
    name: 'Hot',
    component: ()=>import("@/views/Hot.vue")
  },
  {
    path: '/search',
    name: 'Search',
    component: ()=>import("@/views/Search.vue")
  },
  {
    path: '/playlist/:pid',
    name: 'PlayList',
    props:true,
    component: ()=>import("@/views/PlayList.vue")
  },
  {
    path: '/video/:pid',
    name: 'Video',
    props:true,
    component: ()=>import("@/views/Video.vue")
  },
  {
    path: '/singer/:pid',
    name: 'Singer',
    props:true,
    component: ()=>import("@/views/Singer.vue")
  },
]

const router = new VueRouter({
  mode:"hash",
  linkActiveClass:"top-active",
  linkExactActiveClass:"top-exact-active",
  routes
});
export default router
